package team.kirohuji.shiro.token;

import org.apache.shiro.authc.AuthenticationToken;

public class JWTToken implements AuthenticationToken {
	// 密钥
	private String access_token;
	private String host;
	private String token_type;
	private String refresh_token;

	public JWTToken(String access_token, String refresh_token, String host) {
		this.access_token = access_token;
		this.refresh_token = refresh_token;
		this.host = host;
		this.token_type = "jwt";
	}

	public String getToken_type() {
		return token_type;
	}

	@Override
	public Object getPrincipal() {
		return access_token;
	}

	@Override
	public Object getCredentials() {
		return access_token;
	}

	public String getAccess_token() {
		return access_token;
	}

	public void setAccess_token(String access_token) {
		this.access_token = access_token;
	}

	public String getHost() {
		return host;
	}

	public String getRefresh_token() {
		return refresh_token;
	}

	public void setRefresh_token(String refresh_token) {
		this.refresh_token = refresh_token;
	}

	public void setHost(String host) {
		this.host = host;
	}
}
